package com.lin.chapter19;

import java.util.Map;

public class OuterUserInfo extends OuterUser implements IUserInfo {
	private Map<String, String> baseInfo = super.getUserBaseInfo();
	private Map<String, String> homeInfo = super.getUserHomeInfo();
	private Map<String, String> officeInfo = super.getUserOfficeInfo();

	@Override
	public String getUsername() {
		String username = this.baseInfo.get("username");
		System.out.println(username);
		return username;
	}

	@Override
	public String getHomeAddress() {
		String homeAddress = this.homeInfo.get("homeAddress");
		System.out.println(homeAddress);
		return homeAddress;
	}

	@Override
	public String getMobileNumber() {
		String mobileNumber = this.homeInfo.get("mobileNumber");
		System.out.println(mobileNumber);
		return mobileNumber;
	}

	@Override
	public String getOfficeTelNumber() {
		return null;
	}

	@Override
	public String getJobPosition() {
		String jobPosition = this.officeInfo.get("jobPosition");
		System.out.println(jobPosition);
		return jobPosition;
	}

	@Override
	public String getHomeTelNumber() {
		String homeTelNumber = this.homeInfo.get("homeTelNumber");
		System.out.println(homeTelNumber);
		return homeTelNumber;
	}
}
